package com.example.texted.eventlistenerdemo;

import java.util.EventObject;

public class PercentEvent extends EventObject {
    private Object source;

    private int  percent;
    /**
     * Constructs a prototypical Event.
     *每次我监听的对象（testListenerExecuter ）改变的时候，都会把他的改变传递给我（PercentEvent ），我在把改变传递给需要这个改变的地方（run类）。
     * @param source The object on which the Event initially occurred.
     * @throws IllegalArgumentException if source is null.
     */

    public PercentEvent(Object source, int percent) {
        super(source);
        this.percent = percent;
        this.source = source;
    }

    public int getPercent() {
        return percent;
    }
}
